home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 12⁄15⁄89 / 0185-Re Failure Handling-Dec89 < prev    next >
Encoding:
Text File  |  1989-12-15  |  1.3 KB  |  31 lines  |  [TEXT/GEOL]

  1. Item    1961432                         12-Dec-89        09:01
  2.  
  3. From:   A14                             Carnegie Mellon, Rob Chandok,PRA
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Sub:    Re: Failure Handling
  8.  
  9. On clarification, I think, regarding Jeff's explanation of failure handlers.
  10. He claims that since registers are restored when a failure is "caught" in the
  11. handler, that local variables values are restored.  I don't think this is
  12. necessarily the case.
  13.  
  14. There may be too many bytes of local variables to fit into registers, so at the
  15. time of the failure if you inspect the value of a local you should assume that
  16. values of the local are the *latest* values.  Of course, if the compiler does
  17. leave some locals in the registers, they would be restored to their old values.
  18. My suspicion is that since the locals could be up-level addressed by the
  19. failure handler, the compiler won't leave out of date copies on the stack.
  20.  
  21. In general, I am just trying to point out that you shouldn't depend on the
  22. state of locals being restored by your failure handler.  The failure handler
  23. references locals in the "main" procedure as uplevel addressed, which means
  24. they are referenced via a frame ptr, not directly from a register.
  25.  
  26. I know, a minor point. But possibly fatal for someone.  Sorry for the tirade.
  27. I liked Jeff's explanation alot, otherwise.
  28.  
  29. Rob
  30.  
  31.